{% extends "admin/base.html" %}
{% block ext_css %}
    <link href="{{ url_for('static',filename='js/responsive-tables/responsive-tables.css') }}" rel="stylesheet"
          type="text/css">
{% endblock %}
{% block content %}
    <ol class="breadcrumb">
        <li><a href="#">后台</a></li>
        <li class="active">基本设置</li>
    </ol>
    <hr/>
    <form class="inline container" action="" method="post" role="from">
        {{ form.csrf_token }}
        <div class="input-group col-md-4">
            <label class="input-group-addon"><i
                    class="glyphicon glyphicon-certificate red"></i>{{ form.blog_name.label }}</label>
            {{ form.blog_name( class="form-control",placeholder="网站名称") }}

        </div>
        {% for error in form.errors.blog_name %}
            <label class="pull" style="color: red;">{{ error }}</label>
        {% endfor %}
        <br>

        <h2><i class="glyphicon glyphicon-user red"></i>邮件服务器设置：</h2>

        <div id="myTabContent" class="tab-content container">
            <br>

            <div class="row">
                <div class="input-group col-md-4">
                    <span class="input-group-addon"><i
                            class="glyphicon glyphicon-certificate red"></i>{{ form.ADMIN.label }}</span>
                    {{ form.ADMIN( class="form-control",placeholder="管理员邮箱") }}
                </div>
                {% for error in form.errors.ADMIN %}
                    <label class="pull" style="color: red;">{{ error }}</label>
                {% endfor %}
                <br>

                <div class="input-group col-md-4">
                    <span class="input-group-addon"><i
                            class="glyphicon glyphicon-certificate red"></i>{{ form.MAIL_SERVER.label }}</span>
                    {{ form.MAIL_SERVER( class="form-control",placeholder="服务器地址") }}
                </div>
                {% for error in form.errors.MAIL_SERVER %}
                    <label class="pull" style="color: red;">{{ error }}</label>
                {% endfor %}
                <br>

                <div class="input-group col-md-4">
                    <span class="input-group-addon"><i
                            class="glyphicon glyphicon-certificate red"></i>{{ form.MAIL_PORT.label }}</span>
                    {{ form.MAIL_PORT( class="form-control",placeholder=form.MAIL_PORT.label) }}
                </div>
                {% for error in form.errors.MAIL_PORT %}
                    <label class="pull" style="color: red;">{{ error }}</label>
                {% endfor %}
                <br>

                <div class="input-group col-md-4">
                    <span class="input-group-addon"><i
                            class="glyphicon glyphicon-certificate red"></i>{{ form.MAIL_USERNAME.label }}</span>
                    {{ form.MAIL_USERNAME( class="form-control",placeholder=form.MAIL_USERNAME.label) }}
                </div>
                {% for error in form.errors.MAIL_USERNAME %}
                    <label class="pull" style="color: red;">{{ error }}</label>
                {% endfor %}
                <br>

                <div class="input-group col-md-4">
                    <span class="input-group-addon"><i
                            class="glyphicon glyphicon-certificate red"></i>{{ form.MAIL_PASSWORD.label }}</span>
                    {{ form.MAIL_PASSWORD( class="form-control",placeholder=form.MAIL_PASSWORD.label) }}
                </div>
                {% for error in form.errors.MAIL_PASSWORD %}
                    <label class="pull" style="color: red;">{{ error }}</label>
                {% endfor %}
                <br>

                <div class="input-group col-md-4">
                    <span class="input-group-addon"><i
                            class="glyphicon glyphicon-certificate red"></i>{{ form.MAIL_USE_TLS.label }}</span>
                    {{ form.MAIL_USE_TLS( class="form-control",placeholder=form.MAIL_USE_TLS.label) }}
                </div>
                {% for error in form.errors.MAIL_USE_TLS %}
                    <label class="pull" style="color: red;">{{ error }}</label>
                {% endfor %}
                <br>

                <div class="input-group col-md-4">
                    <span class="input-group-addon"><i
                            class="glyphicon glyphicon-certificate red"></i>{{ form.MAIL_USE_SSL.label }}</span>
                    {{ form.MAIL_USE_SSL( class="form-control",placeholder=form.MAIL_USE_SSL.label) }}
                </div>
                {% for error in form.errors.MAIL_USE_SSL %}
                    <label class="pull" style="color: red;">{{ error }}</label>
                {% endfor %}
                <br>
            </div>
        </div>
        <h2><i class="glyphicon glyphicon-user red"></i>其他设置：</h2>

        <div class="input-group col-md-4">
            <span class="input-group-addon"><i
                    class="glyphicon glyphicon-certificate red"></i>{{ form.DEFAULT_THEME.label }}</span>
            {{ form.DEFAULT_THEME(class='form-control', placeholder=form.DEFAULT_THEME.label) }}
        </div>
        {% for error in form.errors.DEFAULT_THEME %}
            <label class="pull" style="color: red;">{{ error }}</label>
        {% endfor %}
        <br>
        <button class="btn btn-lg btn-primary " type="submit">保 存 修 改</button>
    </form>
{% endblock %}
